<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" %>
<html>
<head>
    <title>登录</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/style.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/webjars/layui/2.5.6/css/layui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/webjars/layui/2.5.6/layui.all.js">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/webjars/layui/2.5.6/layui.js">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/login.css">
    <script type='text/javascript' src='${pageContext.request.contextPath}/static/js/jquery.particleground.js'></script>
    <script type='text/javascript' src='${pageContext.request.contextPath}/static/js/demo.js'></script>
    <script type='text/javascript' src='${pageContext.request.contextPath}/static/js/login.js'></script>

</head>
<body id="particles">
<div id="intro">
    <div id="a">
        <h3 id="font_size">欢迎登录</h3>
        <form onsubmit="return select()" action="${pageContext.request.contextPath}/login.action" method="post">
            <div id="user_name">
                用户名：<input type="text" name="username" lay-verify="required" id="username" style="height: 36px">
                <span id="span_user"></span><br/>
            </div>
            <div id="user_pwd">
                密 码：<input type="password" name="pwd" id="pwd" style="height: 36px"><br/>
            </div>
            <div id="select">
                <span id="select_span">权限：</span>
                <div id="select_select" >
                    <select name="permission" id="permission" style="height: 35px;border:1px #7F9DB9 solid;">
                        <option value="超级管理员">超级管理员</option>
                        <option value="普通管理员">普通管理员</option>
                        <option value="普通用户">普通用户</option>
                    </select>
                </div>
            </div>
            <div id="rand_code">
                验证码：<input type="text" placeholder="验证码" maxlength="5" name="pagerandom" id="pagerandom" style="height: 36px">
                &nbsp;
                <img src="${pageContext.request.contextPath}/checkcode.action" onclick="this.src=this.src+'?'"
                     id="img1">
            </div>
            <div id="login">
                <input type="submit" value="登录" id="login_bt">
                <a href="${pageContext.request.contextPath}/allUserForgetPwd" style="color: white;font-family: Algerian;font-weight: bold" >忘记密码?</a>
                <input type="reset" value="重置" id="reset">

            </div>
        </form>
        <br>
        <br>
        <div style="color: crimson">
            <span>${login}</span>
            <span id="img_error">${error}</span>
        </div>
    </div>
</div>

<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery/jquery-1.7.2.js">
</script>

<script>
    $(function () {
        $("#login_bt").on("click", function () {
            if ($("#username").val().length == 0) {
                alert("用户名不能为空");
                return false;
            }
            if ($("#pwd").val().length == 0) {
                alert("密码不能为空");
                return false;
            }
            if ($("#pagerandom").val().length == 0) {
                alert("验证码不能为空");
                return false;
            }
        })
    });
</script>
</body>
</html>
